package cn.edu.zut.hhr.service.impl;

import cn.edu.zut.hhr.entity.Order;
import cn.edu.zut.hhr.mapper.OrderMapper;
import cn.edu.zut.hhr.service.IOrderService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author hhr
 * @since 2021-06-19
 */
@Service
public class OrderServiceImpl extends ServiceImpl<OrderMapper, Order> implements IOrderService {

    @Resource
    OrderMapper orderMapper;

    @Override
    public Order getByOrderId(Long oid) {
        return orderMapper.getOrderById(oid);
    }

    @Override
    public List<Order> getOrderByCustomerid(Long customerid) {
        return orderMapper.getOrderByCustomerid(customerid);
    }
}
